import QtQuick 2.12
import QtQuick.Controls 2.5

Page {
    width: 600
    height: 400

    header: Label {
//        text: qsTr("Page 1")
        font.pixelSize: Qt.application.font.pixelSize * 2
        padding: 10
    }

    Label {
        text: qsTr("You are on Page 1.111???")
        anchors.centerIn: parent
    }


    RoundButton {
        id: backBtn
        z: 109
        x: parent.x + parent.width - 90
        y: parent.y + parent.height / 2 - 50
        width: 60
        height: 60
        focus: false
//        visible: mainSwipeView.currentIndex != 0
        hoverEnabled: enabled
        opacity: hovered ? 1 : 0.5
        background: Rectangle{
            color: "#55ffffff"
            radius: parent.width / 2
        }
//        Image {
//            anchors.centerIn: parent
//            id: backImage
//            source: "qrc:/desktop/images/back.png"
//        }
        MouseArea {
            anchors.fill: parent
            drag.target: backBtn
            drag.minimumX: 0
            drag.minimumY: 0
//            drag.maximumX: mainWindow.width - 60
//            drag.maximumY: mainWindow.height - 60
//            onClicked: {
//                if (mainSwipeView.currentIndex == 3)
//                    mainSwipeView.currentIndex = 0
//                if (mainSwipeView.currentIndex != 0 && mainSwipeView.currentIndex != 3 && backFlag != true)
//                    WINStyle ? mainSwipeView.currentIndex = 0 : mainSwipeView.currentIndex = 3
//                if (backFlag)
//                    mainSwipeView.currentIndex = 0
//            }
        }
    }


}
